Use the functions in this section to create and maintain a database of music components, to save configuration information in the QuickTime Preferences file, to establish connections to external MIDI devices, and to allow the note allocator to perform necessary tasks at task foreground time.
The NARegisterMusicDevice function registers a music component with the note allocator.
pascal ComponentResult NARegisterMusicDevice(
NoteAllocator na,
OSType synthType,
Str31 name,
SynthesizerConnections *connections);
The value of the synthType parameter is the music component's subtype. The name parameter provides a means of distinguishing multiple instances of the same type of device and is a string that can be displayed to the user. If no value is passed in the name parameter, the name defaults to the name of the music component type. The name appears in the instrument picker dialog.
The connections parameter specifies the hardware connections to the device.
The NAUnregisterMusicDevice function removes a previously registered music component from the note allocator.
pascal ComponentResult NAUnregisterMusicDevice(
NoteAllocator na,
long index;
The NAGetRegisteredMusicDevice function returns specifics about music components registered to the specified note allocator instance.
pascal ComponentResult NAGetRegisteredMusicDevice(
NoteAllocator na,
long index,
OSType *synthType,
Str31 name,
SynthesizerConnections *connections,
MusicComponent *mc);
To get a count of the registered music components pass the NAGetRegisteredMusicDevice function 0 in the index parameter. The return value is the count of components. To get information about one of the music components registered with the note allocator, pass the music component index in the index parameter. The index value can be 1 through the number of registered components returned by a previous call to NAGetRegisteredMusicDevice .
If you request information about a specific registered music component, the NAGetRegisteredMusicDevice function returns the type of synthesizer the component supports in the synthType parameter, the name of the synthesizer in the name parameter, and the music component identifier in the mc parameter. For MIDI devices, it returns a pointer to a MIDI devices structure with information about the synthesizer connections.
The NAGetDefaultMIDIInput function is used to obtain external MIDI connection information. This routine, in turn, calls the QT MIDI components to query them. NAGetMIDIPorts is the correct call for users to make. Users should not call QTMIDI .
pascal ComponentResult NAGetDefaultMIDIInput(
NoteAllocator na,
SynthesizerConnections *sc);
The NASGetDefaultMIDIInput function returns an initialized SynthesizerConnections structure containing information about the external MIDI device attached to the system that has been selected as the default MIDI input device. The external MIDI device provides note input directly to the note allocator.
The NASetDefaultMIDIInput function initializes an external MIDI device used to receive external note input.This routine, in turn, calls the QT MIDI components to query them. NAGetMIDIPorts is the correct call for users to make. Users should not call QTMIDI .
pascal ComponentResult NASetDefaultMIDIInput(
NoteAllocator na,
SynthesizerConnections *sc);
The NAGetMIDIPorts function gets the MIDI input and output ports available to a note allocator.This routine, in turn, calls the QT MIDI components to query them. NAGetMIDIPorts is the correct call for users to make. Users should not call QTMIDI .
extern pascal ComponentResult NAGetMIDIPorts(
NoteAllocator na,
Handle *inputPorts,
Handle *outputPorts)
The NASaveMusicConfiguration saves the current list of registered devices to a file.
pascal ComponentResult NASaveMusicConfiguration (NoteAllocator na);
Call the NATask function periodically to allow the note allocator to perform tasks in foreground task time.
extern pascal ComponentResult NATask (NoteAllocator na)